Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LoongArch64 build support #3198

Merged
merged 36 commits into from
Mar 24, 2025
Merged

Add LoongArch64 build support #3198

merged 36 commits into from
Mar 24, 2025

Conversation

4Darmygeometry
Copy link
Contributor

@4Darmygeometry 4Darmygeometry commented Mar 13, 2025

Description of Change

Add LoongArch64 build support, LoongArch64 is a new ISA Cored By Loongson Technology LLC.

Bugs Fixed

API Changes

None.

Behavioral Changes

None.

Required skia PR

None.

PR Checklist

  • [√] Has tests (if omitted, state reason in description)
  • [√] Rebased on top of main at time of PR
  • [√] Merged related skia PRs
  • [√] Changes adhere to coding standard
  • [√] Updated documentation

@4Darmygeometry

This comment was marked as outdated.

@kasperk81
Copy link
Contributor

it will be much easier to add this arch after #3200 goes in

@4Darmygeometry
Copy link
Contributor Author

it will be much easier to add this arch after #3200 goes in

Suggest adding RISC-V 64 and LoongArch64 simultaneously

This comment was marked as outdated.

@mattleibow

This comment was marked as outdated.

This comment was marked as outdated.

@mattleibow

This comment was marked as outdated.

This comment was marked as outdated.

@kasperk81
Copy link
Contributor

@mattleibow are you planning to merge this before #3200?

@kasperk81
Copy link
Contributor

i started this work before them and they are just piggybacking. the decent thing to do is to wait for my work to finish..

@mattleibow
Copy link
Contributor

I am not merging yet. I am just checking the build.
@4Darmygeometry can keep this open and rebase already on the PR by @kasperk81

Once we merge that, the diff will suddenly shrink.

@mattleibow mattleibow marked this pull request as draft March 14, 2025 12:55
@4Darmygeometry 4Darmygeometry marked this pull request as ready for review March 22, 2025 17:16
Copy link
Contributor

@kasperk81 kasperk81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@kasperk81
Copy link
Contributor

@mattleibow i suggest merge this pr and publish the next release to nuget.org. there hasn't been a release pushed there in the first quarter of the year, so timing couldn't be better. further refactorings #3209 etc. can continue later

@4Darmygeometry 4Darmygeometry marked this pull request as ready for review March 24, 2025 13:22
@4Darmygeometry 4Darmygeometry marked this pull request as draft March 24, 2025 13:44
@mattleibow
Copy link
Contributor

woohoo, all green now:
image

@mattleibow
Copy link
Contributor

mattleibow commented Mar 24, 2025

We don't need the Deepin changes! CI was just being difficult. Could we revert those changes for now up to the merge main as it was green then.

@4Darmygeometry
Copy link
Contributor Author

woohoo, all green now:
image

Use Debian Trixie or Deepin 23?

@4Darmygeometry
Copy link
Contributor Author

We don't need the Deepin changes! CI was just being difficult. Could we revert those changes for now up to the merge main as it was green then.

Has been revert to Debian Trixie

@4Darmygeometry 4Darmygeometry marked this pull request as ready for review March 24, 2025 14:07
@mattleibow
Copy link
Contributor

/azp run

Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@mattleibow mattleibow merged commit cefe0e6 into mono:main Mar 24, 2025
1 of 2 checks passed
@mattleibow
Copy link
Contributor

mattleibow commented Mar 24, 2025

Thanks @4Darmygeometry for the work getting this ready to be merged. Looking forward to hearing stories about the users of LoongArch64 chips!

@4Darmygeometry
Copy link
Contributor Author

Reference code:
#3192
#3200

@mattleibow
Copy link
Contributor

Hi folks,

The builds are now available on the preview feed: https://aka.ms/skiasharp-eap/index.json
Let me know if version 3.119.0-preview.0.38 is now working again for you.

As soon as you let me know, I can release this to NuGet and then hopefully a stable version shortly afterwards.

@4Darmygeometry
Copy link
Contributor Author

Hi folks,

The builds are now available on the preview feed: https://aka.ms/skiasharp-eap/index.json Let me know if version 3.119.0-preview.0.38 is now working again for you.

As soon as you let me know, I can release this to NuGet and then hopefully a stable version shortly afterwards.

Successfully download and use, can release this to NuGet, thanks.
linux-loongarch64

skiasharp.nativeassets.linux/3.119.0-preview.0.38/runtimes/linux-loongarch64/native/libSkiaSharp.so and skiasharp.nativeassets.linux/3.119.0-preview.0.38/runtimes/linux-musl-loongarch64/native/ packaged normally and able to use normally.

gamma@gamma-pc [ ~ ] ! nuget install SkiaSharp.NativeAssets.Linux -Version 3.119.0-preview.0.38 -Source https://pkgs.dev.azure.com/xamarin/public/_packaging/SkiaSharp/nuget/v3/index.json
Feeds used:
  /home/gamma/.nuget/packages/
  https://pkgs.dev.azure.com/xamarin/public/_packaging/SkiaSharp/nuget/v3/index.json



Attempting to gather dependency information for package 'SkiaSharp.NativeAssets.Linux.3.119.0-preview.0.38' with respect to project '/home/gamma', targeting 'Any,Version=v0.0'
Gathering dependency information took 1.13 sec
Attempting to resolve dependencies for package 'SkiaSharp.NativeAssets.Linux.3.119.0-preview.0.38' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'SkiaSharp.NativeAssets.Linux.3.119.0-preview.0.38'
Resolved actions to install package 'SkiaSharp.NativeAssets.Linux.3.119.0-preview.0.38'
Retrieving package 'SkiaSharp.NativeAssets.Linux 3.119.0-preview.0.38' from 'https://pkgs.dev.azure.com/xamarin/public/_packaging/SkiaSharp/nuget/v3/index.json'.
  GET https://pkgs.dev.azure.com/xamarin/6fd3d886-57a5-4e31-8db7-52a1b47c07a8/_packaging/737d9830-bed0-4b55-8699-c93e7b529ed0/nuget/v3/flat2/skiasharp.nativeassets.linux/3.119.0-preview.0.38/skiasharp.nativeassets.linux.3.119.0-preview.0.38.nupkg
  OK https://pkgs.dev.azure.com/xamarin/6fd3d886-57a5-4e31-8db7-52a1b47c07a8/_packaging/737d9830-bed0-4b55-8699-c93e7b529ed0/nuget/v3/flat2/skiasharp.nativeassets.linux/3.119.0-preview.0.38/skiasharp.nativeassets.linux.3.119.0-preview.0.38.nupkg 1429ms
Installing SkiaSharp.NativeAssets.Linux 3.119.0-preview.0.38.
Adding package 'SkiaSharp.NativeAssets.Linux.3.119.0-preview.0.38' to folder '/home/gamma'
Added package 'SkiaSharp.NativeAssets.Linux.3.119.0-preview.0.38' to folder '/home/gamma'
Successfully installed 'SkiaSharp.NativeAssets.Linux 3.119.0-preview.0.38' to /home/gamma
Executing nuget actions took 29.87 sec

@4Darmygeometry
Copy link
Contributor Author

4Darmygeometry commented Mar 25, 2025

Hi folks,

The builds are now available on the preview feed: https://aka.ms/skiasharp-eap/index.json Let me know if version 3.119.0-preview.0.38 is now working again for you.

As soon as you let me know, I can release this to NuGet and then hopefully a stable version shortly afterwards.

But only the latest compiled SkiaSharp, not HarfBuzzSharp

I want to use the latest built SkiaSharp.NativeAssets.Linux and HarfBuzzSharp.NativeAssets.Linux NuGet packages to support LoongArch64. However, the HarfBuzzSharp.NativeAssets.Linux NuGet package I found was built in December 2024, which is four months ago; only the SkiaSharp.NativeAssets.Linux NuGet package has the latest build in March 2025
https://pkgs.dev.azure.com/xamarin/public/_packaging/SkiaSharp/nuget/v3/registrations2-semver2/HarfbuzzSharp.NativeAssets.Linux/index.json

@mattleibow
Copy link
Contributor

But only the latest compiled SkiaSharp, not HarfBuzzSharp

Is there an issue with harfbuzz?

@4Darmygeometry
Copy link
Contributor Author

But only the latest compiled SkiaSharp, not HarfBuzzSharp

Is there an issue with harfbuzz?

#3197

@mattleibow
Copy link
Contributor

I am not sure what you mean... Your PR also includes harfbuzz binaries. Or maybe you linked to a different issue?

@4Darmygeometry
Copy link
Contributor Author

I am not sure what you mean... Your PR also includes harfbuzz binaries. Or maybe you linked to a different issue?

I want to use the latest built SkiaSharp.NativeAssets.Linux and HarfBuzzSharp.NativeAssets.Linux NuGet packages to support LoongArch64. However, the HarfBuzzSharp.NativeAssets.Linux NuGet package I found was built in December 2024, which is four months ago; only the SkiaSharp.NativeAssets.Linux NuGet package has the latest build in March 2025
https://pkgs.dev.azure.com/xamarin/public/_packaging/SkiaSharp/nuget/v3/registrations2-semver2/HarfbuzzSharp.NativeAssets.Linux/index.json

@mattleibow
Copy link
Contributor

I see. The versions are a bit mixed up in order as main builds are preview.0 but we have a preview.2 out. This build (8.3.1-preview.0.38) is actually there about halfway down the page: https://dev.azure.com/xamarin/public/_artifacts/feed/SkiaSharp/NuGet/HarfBuzzSharp.NativeAssets.Linux/overview/8.3.1-preview.0.38

Once I branch for release, it will get a real number.

@4Darmygeometry
Copy link
Contributor Author

4Darmygeometry commented Mar 25, 2025

I see. The versions are a bit mixed up in order as main builds are preview.0 but we have a preview.2 out. This build (8.3.1-preview.0.38) is actually there about halfway down the page: https://dev.azure.com/xamarin/public/_artifacts/feed/SkiaSharp/NuGet/HarfBuzzSharp.NativeAssets.Linux/overview/8.3.1-preview.0.38

Once I branch for release, it will get a real number.

Successfully to download and use, can branch for release and put it and SkiaSharp into nuget.org, thanks.

gamma@gamma-pc [ ~ ] $ nuget install HarfBuzzSharp.NativeAssets.Linux -Version 8.3.1-preview.0.38 -Source https://pkgs.dev.azure.com/xamarin/public/_packaging/SkiaSharp/nuget/v3/index.json
Feeds used:
  /home/gamma/.nuget/packages/
  https://pkgs.dev.azure.com/xamarin/public/_packaging/SkiaSharp/nuget/v3/index.json



Attempting to gather dependency information for package 'HarfBuzzSharp.NativeAssets.Linux.8.3.1-preview.0.38' with respect to project '/home/gamma', targeting 'Any,Version=v0.0'
Gathering dependency information took 3.14 sec
Attempting to resolve dependencies for package 'HarfBuzzSharp.NativeAssets.Linux.8.3.1-preview.0.38' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'HarfBuzzSharp.NativeAssets.Linux.8.3.1-preview.0.38'
Resolved actions to install package 'HarfBuzzSharp.NativeAssets.Linux.8.3.1-preview.0.38'
Retrieving package 'HarfBuzzSharp.NativeAssets.Linux 8.3.1-preview.0.38' from 'https://pkgs.dev.azure.com/xamarin/public/_packaging/SkiaSharp/nuget/v3/index.json'.
  GET https://pkgs.dev.azure.com/xamarin/6fd3d886-57a5-4e31-8db7-52a1b47c07a8/_packaging/737d9830-bed0-4b55-8699-c93e7b529ed0/nuget/v3/flat2/harfbuzzsharp.nativeassets.linux/8.3.1-preview.0.38/harfbuzzsharp.nativeassets.linux.8.3.1-preview.0.38.nupkg
  OK https://pkgs.dev.azure.com/xamarin/6fd3d886-57a5-4e31-8db7-52a1b47c07a8/_packaging/737d9830-bed0-4b55-8699-c93e7b529ed0/nuget/v3/flat2/harfbuzzsharp.nativeassets.linux/8.3.1-preview.0.38/harfbuzzsharp.nativeassets.linux.8.3.1-preview.0.38.nupkg 2146ms
Installing HarfBuzzSharp.NativeAssets.Linux 8.3.1-preview.0.38.
Adding package 'HarfBuzzSharp.NativeAssets.Linux.8.3.1-preview.0.38' to folder '/home/gamma'
Added package 'HarfBuzzSharp.NativeAssets.Linux.8.3.1-preview.0.38' to folder '/home/gamma'
Successfully installed 'HarfBuzzSharp.NativeAssets.Linux 8.3.1-preview.0.38' to /home/gamma
Executing nuget actions took 8.39 sec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[FEATURE] LoongArch64 flavor of libSkiaSharp and libHarfBuzzSharp
3 participants